﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HRM
{
    public struct CreateFiscalYearParam
    {
        public string ms_NumberMonths;
        public string ms_StartDate;
        public string ms_MaxDateLocked;
    }

    public partial class FormCreatePeriodSalYear : Form
    {
        private CreateFiscalYearParam mstr_param;

        public FormCreatePeriodSalYear()
        {
            InitializeComponent();
        }

        private void FormCreatePeriodSalYear_Load(object sender, EventArgs e)
        {
            dtpStartingDate.Text = GetParam().ms_StartDate;
            txtNoOfPeriods.Text = "12";
        }

        public void SetParam(CreateFiscalYearParam aps_param)
        { mstr_param = aps_param; }

        public CreateFiscalYearParam GetParam()
        { return mstr_param; }

        private void btnOk_Click(object sender, EventArgs e)
        {
            mstr_param.ms_StartDate = dtpStartingDate.Value.ToLongDateString();
            mstr_param.ms_NumberMonths = txtNoOfPeriods.Text;
            SetParam(mstr_param);
        }
    }
}
